Design and Validation of a Modular Control Platform for a Voltage Source Inverter

Integrating renewable energies, such as wind or photovoltaic, requires an electronic power converter, the three-phase Voltage Source Inverter (VSI) the most common for such function. This paper presents a modular design of signal acquisition and control hardware (current and voltage) for the commercial SEMIKRON SKS35F VSI converter and a Texas Instruments TMS320F28335 DSP. Consequently, the proposed modular and open-source design allows its application in control systems of a VSI converter for isolated or grid-connected systems, applied to power generation based on renewable sources. The proposed scheme allows for a personalised design since it uses an open architecture to implement its own control algorithms that allow it to adapt to the application’s particular needs, unlike closed-architecture commercial equipment. Detailed electronic printed circuit board designs for implementation are shown on paper. Finally, the experimental tests’ results that validate the proposed design’s correct functioning are presented.


Hardware in context
The DC/AC conversion system was designed for alternative generation systems, such as solar photovoltaic (PV) or wind systems, taking advantage of the energy stored in a bank of batteries or capacitors. The hardware designed to control the Voltage Source Inverter (VSI) type converter includes the measurement and signal conditioning circuits used to implement the control algorithms. The designed system allows its use in a general way in any DC/AC power conversion system, and particularly for this paper, its use in applications based on renewable energies is shown. The designed hardware allows a customised implementation based on the particular characteristics of the generation system in use since the design is of open, modular and scalable architecture, as well as a controller based on a Digital Signal Processor (DSP) with an algorithm written in C language that allows quick changes of control algorithms for your optimization process. The AC/DC voltage measurement circuits and the AC/DC current measurement circuits have been designed with an output voltage range compatible with the input levels of the A/D converters of the selected DSP. These measurement and conditioning circuits have a modular structure independent from the main board to facilitate adaptability to various applications and facilitate corrective maintenance and replacement of damaged parts. The system has circuits to adapt the voltage levels necessary to trigger the Insulated Gate Bipolar Transistors (IGBTs) of the VSI. Finally, the main motherboard interfaces each acquisition module with the DSP controller.

General scheme of the experimental platform
The DC/AC power conversion scheme is shown in Fig. 1, in which the first stage is made up of an energy storage source based on renewable generation sources [1,2]. The DC/AC converter stage converts the direct voltage stored in batteries to a three-phase alternating output voltage [3]. For this purpose, the Semikron SKS 35F B6U [4] converter is used. The control stage consists of voltage and current measurement boards and a DSP Control module, where the latter is in charge of generating the switching signals for the inverter based on the implemented control algorithm and measured input signals; the controller is the Texas Instruments TMS320F28335 DSP [5]. Finally, outputs of the DC/AC converter pass through an LC filter that mitigates produced harmonics by the switching nature of the IGBTs, smoothing the output in such a way as to obtain the fundamental signal of 50 Hz.

Voltage measurement and conditioning circuit
In the measurement schematic shown in Fig. 3, the signal to be measured, the sensor measurement block, the conditioning block and finally, the DSP control module can be seen. The measurement and conditioning blocks are hereinafter referred to as the measurement and conditioning circuit. This consists of three stages; the first stage is responsible for detecting the analogue signal of interest and reducing it to the DSP module's working range, to a 3 V pp . For this, the LEM voltage sensor is used, and considering the desired input, output voltage range y the sensor specifications [6], a resistive value of R 1 ¼ 68 kX is chosen to obtain an input current of the LEM voltage sensor of 5.5mA, with a conversion ratio equal to 2:5, a current I m = 13:9 mA is obtained at its output. Through the resistor R 23 , current I m is transformed into the desired voltage V m , as shown in Fig. 4a. Resistor R 23 sets the gain of the LEM LV25-P sensor, as expressed by (1). Fig. 4b shows the plate where the LV25-P voltage transformers are mounted. This board is modular and mounts independently of the conditioning circuitry on the main baseboard.
The second stage creates a voltage reference value of -1:5 V necessary for the offset level required by the control module. At the input of this stage, the LM337L is used, which is a negative output linear regulator. Fig. 5 shows the offset level generation circuit. The output voltage (in Volts) is set based on the selection of resistors (in X) R 21 and R 22 , as shown in (2).
The selected voltage V Ã ¼ À1:25 V and resistive values for implementation are: R 22 ¼ 51X; R 21 ¼ 240X. The third stage is responsible for assembling the voltage of amplitude 3 V pp obtained at the output of the first stage (LEM LV-25P) on the continuous voltage of 1:5 V obtained in the second stage. It uses a subtracter circuit, as shown in Fig. 6. For the design of this stage, operational amplifier OPA350UA [7] is used. To obtain a unity gain, the resistors were taken to have the same value, R = 3:3 kX. Eq. (3) shows the final expression of the output voltage V o : being V m the output of the stage and the voltage reference V ref ¼ À1:5 V. Fig. 7 shows the schematic circuit design corresponding to the conditioning of the voltage signal measurements, whose output will be connected to the A/D converter of the control board Texas Instruments DSP TMS320F28335. Fig. 8 presents the designed, assembled and calibrated voltage adjustment plate.

Current measurement and conditioning circuit
Similarly to the previous case, the current measurement scheme and conditioning circuit consist of three stages, as shown in Fig. 9. The first stage is responsible for obtaining a voltage of 3 V pp proportional to the output of the current sensor LEM LA 55-P [8]. For this reason, a trans-impedance amplifier is used, as shown in Fig. 10 [9]. Resistor R 1 sets the gain for this stage.
The trans-impedance converter was designed in such a way to obtain an output voltage of 3 V pp , for a maximum input current of 14:5 A rms . The circuit gain is set as R 1 ¼ 220 X. The Texas Instruments OPA690ID operational amplifier was used for implementation, which operates with a supply of AE5 V.     Subsequently, the next stage generates a reference of 1:5 V, used for an offset voltage. At the input of this stage, a Texas Instruments REF 21080 voltage regulator is used, which generates a high-precision reference voltage of 3:3 V with a supply of 5 V [10]. This voltage enters the amplifier as shown in the circuit of Fig. 11. The output voltage of the offset circuit is given by (5).
The resistive values used for the design are R 5 = 2:2 kX, R 6 = 4:7 kX, where Rp is a potentiometer of 10 kX used to adjust the gain. The potentiometer is considered for fine-adjusting the output voltage to the value of -1:5 V. Then, the output voltage from the trans-impedance amplifier of the first stage is combined with the offset voltage from the previous stage. This uses a voltage subtraction circuit based on the OPA350 operational amplifier, observed in Fig. 12. Using the same values for all resistors, 12 kX, the output voltage V 0 is given by: being V 1 the output of first stage, V 2 the À1:5V reference and V 0 represents the conditioned signal. Fig. 13 shows the circuit schematic corresponding to the current adjustment stage used to condition the signals of the Hall-effect current sensors. Capacitance C f 1 allows the designer to compensate for the effect of the high-frequency noise introduced to the converter, making the position of the pole in a closed loop is defined by the following design equation: and provides a bandwidth (f À3dB ) approximately equal to: where GBP represents the gain-bandwidth product of the operational amplifier OPA 690. Taking into account the design Eqs. (7) and (8), and considering a desired output voltage of AE1:5 V, for an input current range of AE15 mA. Once the value of resistor R 1 has been determined, and knowing the bandwidth requirements, it is possible to determine the values of implicit capacitors in the design C d1 ¼ 4:7 lF and C f 1 ¼ 10 gF, respectively. Fig. 14 shows the current adaptation plate designed, assembled and calibrated. (See Fig. 15).

Pulse width modulation trigger signal adaptation stage
The proposed design meets the system's needs in terms of bandwidth and protection. Pulse Width Modulation (PWM) pre-actuation stage is a subsystem of the coupling circuit, whose function is to convert voltage levels of digital output ports of the DSP control module, whose logic levels vary between 0 and 3:3 V, to voltage values of 0 and 15 V compatible with the operating levels of VSI SKS 35 F. In addition, this stage protects the peripherals of the DSP through a galvanic isolation network implemented using Texas Instruments ISO7240CDW series isolators. (See Fig. 16).

LC-based low-pass filter
Then, the VSI's output voltage must be filtered to obtain a sinusoidal output signal with the same grid's voltage and frequency characteristics. For this purpose, an LC-Low-Pass Filter (LPF) is used, which is implemented through a 1 mH threephase inductor and a 33 lF three-phase capacitor in delta connection. A cutoff frequency of 505 Hz is used for the values of L and C. Fig. 17 shows a photo of the elements used for the LC filter.

Design files summary
.

Build instructions
The designed PCB of all employed Integrated Circuits (ICs) on the conditioning board are of surface mount packages. Several components were not implemented in their libraries, so they were designed. The schematic diagram and PCB layout were developed using the KiCad application.
It should be noted that the main board was designed in two layers to reduce the dimension of the resulting board and use the modular design concept, leaving this main board as the motherboard for the adaptation boards. Different ground planes were placed on both sides for digital and analogue grounds. Both ground planes are connected with ferrite to reduce external noise's influence. The advantage of the implemented design is its modularity, which facilitates maintenance and repair work due to the rapid exchange of defective or damaged parts.
The main board has a dimension of 250 mm Â 180 mm. The PCBs were elaborated in JLCPCB factory: PCB Prototype & PCB Manufacture Manufacturer by sending Gerbers files generated in KiCad software.
All paths on the board were subjected to continuity tests to verify that there were no short circuits between paths. The surface mount components were soldered with a soldering station and were the first to be assembled, followed by finishing with the through-hole components. Component names are clearly labelled on the PCB silkscreen and correspond to the names in the bill of materials (column designator). Fig. 18 shows the main board with other mounted and embedded boards.

Operation instructions
In what follows, step-by-step operational instructions for operating the hardware are presented.
1. Check on the dashboard that safety switch is in ON position and the emergency stop button is in correct position. This is a safety measure to ensure better equipment operation and reduces the chances of human error or accidents.
2. Activate the contactor, check that the power supplies is on and verify that pre-charge activation timer deactivates after 4 s. 3. Connect the computer with USB cable. 4. Start the programming interface of the DSP Control Module (Code Composer Studio). 5. Compile pseudo-code of the control algorithm. 6. Perform experiments. 7. Flip the safety switch back to OFF position once you are done, and close the interface.Safety Notice: High voltage is handled at the input of the voltage transformation board corresponding to the left side of the board. Therefore, precautions should be taken to prevent users from accidental shocks. Do not touch any of the components connected to the highvoltage terminals.

Validation and characterisation
For a correct operation of the control algorithms, it is necessary to carry out a calibration process of the signal conditioning circuits and sensors working in the appropriate range. In the calibration process, maximum values supported by the DSP must be considered for a correct and precise D/A conversion.

Voltage measurement circuit calibration
The voltage measurement and conditioning circuit was designed to measure voltage levels of the electrical grid 220=380 V rms . The results obtained from the circuit calibration process are summarised in Table 1. Fig. 19a shows 220 V input voltage signals and 3 V output signal, obtained after the calibration process. In turn, Fig. 19b shows the final result of the signal acquisition process corresponding to the three-phase voltages of 220/380 V electrical grid.

Calibration of the current measurement circuit
A calibration process similar to voltage sensors was carried out for current signal measurement and conditioning circuits. The results obtained from the calibration process are shown in Table 2. Fig. 20a shows input current signals used for the experiment and 3 V output signal obtained after the calibration process. In turn, Fig. 20b shows the final result of signal acquisition process corresponding to the three-phase test currents.

PWM pre-actuation circuit calibration
Regarding the pre-actuation block, the controller output voltage levels for PWM triggers produced by the DSP and the output levels obtained after the conditioning of the pre-actuation stage were measured. Fig. 21a shows the PWM trigger signals obtained at the output of the DSP controller. In turn, Fig. 21b denotes PWM output signals adapted to trigger logic levels for IGBTs of the VSI.   Fig. 20. a) Test current input and current sensor output signals. b) Three-phase output signals measured with current sensors.  Fig. 23 shows the scheme of the implemented experimental platform. The reference signals are generated employing mathematical expressions that define the temporal behaviour of sinusoidal three-phase voltages, with a frequency equal to the electrical grid and an amplitude defined according to the delivered power into the system. Fig. 24a shows three-phase sinusoidal output voltage signals of the VSI. Both signals were obtained by measurements made with an oscilloscope. Output filtered through the LPF is shown in the same figure. By programming, a correct reference, appropriate PWM modulation, low-pass LC filtering, and three-phase sinusoidal voltage signals shifted 120 to each other is   obtained. Once the correct operation of the system has been verified, experimental tests are continued with higher values of DC-link. Fig. 24b shows the system response when increasing the magnitude of the DC-Link, obtaining a sinusoidal signal with a maximum amplitude of 310 V and a frequency of 50 Hz.

Closed-loop test
For closed-loop tests, the evaluated conditions in the simulations, using MATLAB/Simulink environment, were replicated, and subsequently, output voltage waveforms were obtained and captured with oscilloscope. The comparison between obtained waveforms through simulations and experimental measurements shows the correspondence between them and, therefore, the performance of the designed VSI. Fig. 25a shows output signals obtained through simulations and Fig. 25b shows output signals of the converter obtained through experimental tests.

Total harmonic distortion analysis
Finally, the quantification of Total Harmonic Distortion (THD) level is a parameter that indicates how much the signal's harmonics cause voltage or current distortion [11]. This parameter constitutes a crucial figure of merit when analysing the efficiency of a power converter system. Fig. 26a,b show the analysis of THD level on the experimental platform for phase a of the system; a value of 5:3% was obtained. This result was obtained using the fast Fourier transformation, considered as a function of the oscilloscope. Mathematically speaking, THD is defined as:  where i s1 is the fundamental component of the measured currents and i sj are the harmonic currents.

Conclusion
In this paper, the control system platform for a commercial VSI was designed to be a modular, scalable, multipurpose and open architecture. The electronic design was based on recommendations provided in the manufacturer technical data sheets, considering immunity criteria to noise, electrical insulation for protection, and an assembly that allows effective corrective maintenance.
Initially, experimental measurements were performed using reduced reference voltage levels to protect hardware's integrity and evaluate the proposed design performance. Once this testing stage had been satisfactorily passed, tests were carried out at standard voltage levels for electrical networks.
Experimental measurements obtained with the designed voltage and current measurement and conditioning circuits have demonstrated that they meet the proposed objectives, presenting good linearity and reduced electrical noise levels within voltage levels admitted in the A/D converter modules of the DSP.
Regarding the levels of harmonic distortion in the output signal, a result of 5:3 % was obtained, which is within the expected range for this type of VSI and can be improved by implementing more elaborate control algorithms and modulation techniques.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.